﻿
using System;
using System.ServiceModel;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EnterpriseServices.Service
{
    /// <summary>
    /// 
    /// </summary>
    class PasswordService : IPasswordManager
    {

        #region IPasswordManager Members

        /// <summary>
        /// Gets a value indicating whether the current membership provider is configured to allow userNames to reset their passwords. Returns true if the membership provider supports password reset; otherwise false
        /// </summary>
        /// <param name="application">The application.</param>
        /// <returns></returns>
        public bool EnablePasswordReset(string application)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Gets a value indicating whether the current membership provider is configured to allow userNames to retrieve their passwords. Returns true if the membership provider supports password retrieval; otherwise false
        /// </summary>
        /// <param name="application">The application.</param>
        /// <returns></returns>
        public bool EnablePasswordRetrieval(string application)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Geenrates a password according to the regular expression and other restrictions
        /// </summary>
        /// <param name="application">The application.</param>
        /// <param name="length">The length.</param>
        /// <param name="numberOfNonAlphanumericCharacters">The number of non alphanumeric characters.</param>
        /// <returns></returns>
        [OperationBehavior(TransactionScopeRequired = true)]
        public string GeneratePassword(string application, int length, int numberOfNonAlphanumericCharacters)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Returns the maximum allowed of password retries before locking out the userName
        /// </summary>
        /// <param name="application">The application.</param>
        /// <returns></returns>
        public int GetMaxInvalidPasswordAttempts(string application)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Returns the minimum required number of non alphanumeric characters
        /// </summary>
        /// <param name="application">The application.</param>
        /// <returns></returns>
        public int GetMinRequiredNonAlphanumericCharacters(string application)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Returns the minimum required password length
        /// </summary>
        /// <param name="application">The application.</param>
        /// <returns></returns>
        public int GetMinRequiredPasswordLength(string application)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Gets the number of minutes in which a maximum number of invalid password or password answer attempts are allowed before the membership userName is locked out
        /// </summary>
        /// <param name="application">The application.</param>
        /// <returns></returns>
        public int GetPasswordAttemptWindow(string application)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Returns the regular expression for the password
        /// </summary>
        /// <param name="application">The application.</param>
        /// <returns></returns>
        public string GetPasswordStrengthRegularExpression(string application)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Gets a value indicating whether the default membership provider requires the userName to answer a password question for password reset and retrieval
        /// </summary>
        /// <param name="application">The application.</param>
        /// <returns></returns>
        public bool RequiresQuestionAndAnswer(string application)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Resets a userName's password to a new,automatically generated password. Returns the new password for the membership userName. Requires the application configuration file to not require password answer
        /// </summary>
        /// <param name="application">The application.</param>
        /// <param name="userName">Name of the userName.</param>
        /// <returns></returns>
        [OperationBehavior(TransactionScopeRequired = true)]
        public string ResetPassword(string application, string userName)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Resets a userName's password to a new,automatically generated password. Returns the new password for the membership userName. Requires the password answer
        /// </summary>
        /// <param name="application">The application.</param>
        /// <param name="userName">Name of the userName.</param>
        /// <param name="passwordAnswer">The password answer.</param>
        /// <returns></returns>
        public string ResetPasswordWithQuestionAndAnswer(string application, string userName, string passwordAnswer)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Gets the password for the membership userName from the membership data store. Requires the password answer for the membership userName
        /// </summary>
        /// <param name="application">The application.</param>
        /// <param name="userName">Name of the userName.</param>
        /// <param name="passwordAnswer">The password answer.</param>
        /// <returns></returns>
        public string GetPassword(string application, string userName, string passwordAnswer)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Gets the password question for the userName.
        /// </summary>
        /// <param name="application">The application.</param>
        /// <param name="userName">Name of the userName.</param>
        /// <returns></returns>
        public string GetPasswordQuestion(string application, string userName)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Updates the password for the membership userName in the membership data store. Returns true if the update was successful; otherwise,false. Requires the application configuration file to not require password answer
        /// </summary>
        /// <param name="application">The application.</param>
        /// <param name="userName">Name of the userName.</param>
        /// <param name="newPassword">The new password.</param>
        [OperationBehavior(TransactionScopeRequired = true)]
        public void ChangePassword(string application, string userName, string newPassword)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Updates the password for the membership userName in the membership data store. Returns true if the update was successful; otherwise,false.
        /// </summary>
        /// <param name="application">The application.</param>
        /// <param name="userName">Name of the userName.</param>
        /// <param name="passwordAnswer">The password answer.</param>
        /// <param name="newPassword">The new password.</param>
        public void ChangePasswordWithAnswer(string application, string userName, string passwordAnswer, string newPassword)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
